package com.dzk.cp.c11x5.constant;

public enum R5Type {
	
	SD(1, "SD"), JX(2, "JX"), GD(3, "GD");
	
	private Integer code;
	
	private String desc;
	
	private R5Type(Integer code, String desc) {
		this.code = code;
		this.desc = desc;
	}
	
	public static R5Type get(Integer code) {
		for (R5Type e : R5Type.values()) {
			if (e.code.equals(code)) {
				return e;
			}
		}
		return null;
	}

	public static String getValue(Integer code) {
		R5Type e = get(code);
		return e != null ? e.desc : null;
	}

	public Integer getCode() {
		return code;
	}

	public String getDesc() {
		return desc;
	}

}
